Method For Resource Allocation And Terminal Device

ABSTRACT

A method for resource allocation and a terminal device are provided. The method includes the following operations. A management module of an operating system receives a scenario data package from a target application that is currently running, where the scenario data package contains a scenario associated information of the target application. A strategy module of the operating system determines a performance improvement strategy for the target application according to the scenario data package. The operating system adjusts allocation of system resources for the target application according to the performance improvement strategy.

CROSS-REFERENCE TO RELATED APPLICATION(S)

This application claims priorities to Chinese Application No.201710640040.6, filed on Jul. 31, 2017, Chinese Application No.201710643680.2, filed on Jul. 31, 2017, and Chinese Application No.201710641499.8, filed on Jul. 31, 2017, the contents of all of which arehereby incorporated by reference in their entireties.

TECHNICAL FIELD

This disclosure relates to the technical field of terminal devices, andparticularly to a method for resource allocation and a terminal device.

BACKGROUND

With the rapid development of technologies relating to terminal devices,an increasing number of applications are installed on mobile phones ofusers, such as reading APPs, payment APPs, game APPs, and music APPs.People's daily life is closely linked with the mobile phones.

SUMMARY

Implementations of the present disclosure provide a method for resourceallocation and terminal device.

According to a first aspect of the disclosure, a method for resourceallocation is provided. The method includes the following operations. Amanagement module of an operating system receives a scenario datapackage from a target application that is currently running, where thescenario data package contains scenario associated information of thetarget application. A strategy module of the operating system determinesperformance improvement strategy for the target application according tothe scenario data package. The operating system adjusts allocation ofsystem resources for the target application according to the performanceimprovement strategy.

According to a second aspect of the disclosure, a terminal device isprovided. The terminal device includes at least one processor and acomputer readable storage medium. The computer readable storage iscoupled to the at least one processor and stores at least one computerexecutable instruction thereon which, when executed by the at least oneprocessor, cause the at least one processor to carry out actions of themethod for resource allocation described herein.

According to a third aspect of the disclosure, a non-transitory computerreadable storage medium is provided. The non-transitory computerreadable storage medium stores at least one computer executableinstruction thereon, which, when executed by a data-processingapparatus, adapted to perform actions includes the follows. An operatingsystem receives a scenario data package from a target application thatis currently running. The operating system determines a performanceimprovement strategy for the target application according to thescenario associated information. The operating system adjusts allocationof system resources for the target application according to theperformance improvement strategy.

BRIEF DESCRIPTION OF THE DRAWINGS

The following briefly introduces the accompanying drawings required fordescribing the implementations.

FIG. 1A is a schematic diagram illustrating a program space of a smartphone.

FIG. 1B is a schematic diagram illustrating a system architecture of anAndroid™ system.

FIG. 2 is a schematic flow chart illustrating a method for resourceallocation according to an implementation of the present application.

FIG. 3 is a schematic flow chart illustrating a method for resourceallocation according to another implementation of the presentapplication.

FIG. 4 is a schematic flow chart illustrating a method for resourceallocation according to another implementation of the presentapplication.

FIG. 5 is a schematic flow chart illustrating a method for resourceallocation according to still another implementation of the presentapplication.

FIG. 6 is a schematic flow chart illustrating a method for resourceallocation according to a further implementation of the presentapplication.

FIG. 7 is a schematic structural diagram illustrating a terminal deviceaccording to an implementation of the present application.

FIG. 8 is a block diagram illustrating functional units of a device forresource allocation according to an implementation of the disclosure.

FIG. 9 is a schematic structural diagram illustrating a smart phoneaccording to an implementation of the disclosure.

DETAILED DESCRIPTION

Technical solutions of the implementations of the present disclosurewill be described clearly and completely hereinafter with reference tothe accompanying drawings in the implementations of the presentdisclosure. Apparently, the described implementations are merely somerather than all implementations of the present disclosure. All otherimplementations obtained by those of ordinary skill in the art based onthe implementations of the present disclosure without creative effortsshall fall within the protection scope of the present disclosure.

The terms “first” and “second” used in the specification, the claims,and the accompany drawings of the present disclosure are used todistinguish different objects rather than describe a particular order.The terms “include”, “comprise”, and “have” as well as variationsthereof are intended to cover non-exclusive inclusion. For example, aprocess, method, system, product, or apparatus including a series ofsteps or units is not limited to the listed steps or units, on thecontrary, it can optionally further include other steps or units thatare not listed; alternatively, other steps or units inherent to theprocess, method, product, or device can be included either.

The term “embodiment” or “implementation” referred to herein means thata particular feature, structure, or characteristic described inconnection with the implementation may be contained in at least oneimplementation of the present disclosure. The phrase appearing invarious places in the specification does not necessarily refer to thesame implementation, nor does it refer an independent or alternativeimplementation that is mutually exclusive with other implementations. Itis expressly and implicitly understood by those skilled in the art thatan implementation described herein may be combined with otherimplementations.

The terminal device involved in the implementations of the presentdisclosure may include various handheld devices, on-board devices,wearable devices, computing devices that have wireless communicationfunctions, or other processing devices connected to the wireless modem,as well as various forms of user equipment (UE), mobile stations (MSs),terminal devices, and the like. For the convenience of description, theabove-mentioned devices are collectively referred to as a terminaldevice. An operating system related to the implementations of thedisclosure is a software system that manages hardware resourcesuniformly and provides a user with a service interface. The operatingsystem may be installed or stored in a storing region such as a memory.

As illustrated in FIG. 1A, a terminal device such as a smart phonegenerally has a program space for running programs. The program spaceincludes a user space and an operating system space (that is, a place toinstall the operating system). At least one application, which is athird-party application installed on the terminal device, can run in theuser space. An operating system of the terminal device runs in theoperating system space. Examples of the operating system include but arenot limited to an Android® system and an iPhone operating system (iOS®)that is a mobile operating system developed by Apple. As illustrated inFIG. 1B, the following describes the Android system runs in the terminaldevice as an example. In the case of Android system, the user spaceincludes an application layer of the Android system. The operatingsystem space includes an application framework layer, Libraries andAndroid RunTime layer, and a Linux kernel layer of the Android system.The application layer includes various applications directly interactingwith a user or service programs written in the Java language and runningin the background, for example, programs for implementing common basicfunctions on smart phones, such as short messaging service (SMS),telephone dialing, picture viewers, calendars, games, maps, world wideweb (Web) browsers and so on, as well as other applications developed bydevelopers. The application framework layer provides a series oflibraries necessary for developing Android applications, which can beused to reuse components and achieve personalize extensions throughinheritance. The Libraries and Android RunTime layer can support theapplication framework and provide services for various components in theAndroid system. The Libraries and Android RunTime layer includesLibraries and Android RunTime. The Android RunTime includes a corelibrary and a Dalvik virtual machine. The Linux kernel layer isconfigured to implement core functions such as hardware device driving,process and memory management, network protocol stacks, powermanagement, and wireless communications.

A process created by the third-party application runs in the user spaceat first. When the third-party application needs to execute actions ofsending data through the network and reading disk resources, standardinterface functions, such as “write” or “send” interface functions,provided by the operating system should be invoked; that is requestoperations of a user can be achieved by the central processing unit(CPU) invoking codes of the operating system space. Therefore, athird-party application can only invoke the standard interface functionsprovided by the operating system to achieve functions provided by theoperating system. On the other hand, the operating system has no ideaabout what functions the third-party application is executing, thetarget application also cannot instruct the operating system to executespecial operations, it can be seen that the operating system and thetarget application are independent from each other. Therefore, theoperating system cannot distinguish an internal running scenario of thetarget application and can only use a set of standard parameters foradapting, so that the targeted performance optimization for the internalrunning scenario of the target application cannot be achieved.

In view of the above, implementations of the present application providea method for system resource allocation for a target application of aterminal device.

FIG. 2 illustrates a method for system resource allocation based on ageneral concept of the disclosure. As illustrated in FIG. 2, anoperating system running in an operating system space receives, from auser space, a scenario data package of a target application at block 201and determines a performance improvement strategy for the targetapplication at block 202, then the operating system can adjustallocation of system resources for the target application according tothe performance improvement strategy determined.

The operating system may include a management module and at least onestrategy module. The management module is configured to communicate withapplications installed on the terminal device. The management module hasaccess to the plurality of strategy modules. The strategy modulereferred to herein can be understood as a database for storing strategyinformation. Specifically, each strategy module is configured to storeat least one performance improvement strategy associated with one classof applications. That is, the strategy modules are adapted for differenttypes of target applications. On the other hand, the strategy module isnot merely a database; it also has self-decision and managementfunction. Based on the number of strategy modules included in theoperating system, the system resource allocation adjusting method can beimplemented in different manners.

In one method for system resource allocation, a management module of anoperating system receives a scenario data package from a targetapplication that is currently running, where the scenario data packagecontains scenario associated information of the target application. Astrategy module of the operating system determines performanceimprovement strategy for the target application according to thescenario data package. The operating system adjusts allocation of systemresources for the target application according to the performanceimprovement strategy.

As mentioned above, the operating system may have one or more than onestrategy module, in case more than one strategy module is provided, thestrategy module for determining the performance improvement strategywill be determined first, for example, according to an application typeidentifier included in the scenario data package, which will be detailedbelow.

In another method for system resource allocation, a management module ofan operating system of the terminal device receives a scenario datapackage from a target application that is currently running, where thescenario data package contains scenario associated information of thetarget application and an application type identifier of the targetapplication. The management module determines, from among the pluralityof strategy modules, a strategy module corresponding to the applicationtype identifier. The strategy module of the operating system determinesa performance improvement strategy for the target application that iscurrently running according to the scenario associated information.Thereafter the operating system adjusts allocation of system resourcesfor the target application according to the performance improvementstrategy.

In this way, it is possible to improve the real-time performance andaccuracy of the performance optimization of the target application whichis conducted under control of the terminal device. The followingdescribes the implementations of the present application with referenceto the accompanying drawings.

Multi-Strategy Modules

Referring to FIG. 3, FIG. 3 is a schematic flow chat illustrating amethod for resource allocation according to an implementation of thedisclosure. The operating system for implementing the method has amanagement module and multiple strategy modules. The plurality ofstrategy modules can implement fine control for different types ofapplications. As illustrated in FIG. 3, The method starts at block 301.

At block 301, the management module receives a scenario data packagefrom a target application that is currently running, where the scenariodata package contains a scenario associated information of the targetapplication and application type identifier of the target application.The application type identifier can be used to identify a type of one ormore applications.

The target application refers to a third-party application installed ina user space of the terminal device. The third-party application may bean Instant Messenger App or a game App for example. The third-partyapplication may be installed by a user or pre-installed by developersbefore the terminal device leaves the factory. The disclosure is notlimited thereto. Each class of applications may have one identifier setin advance to be distinguished from other classes of applications.

The scenario data package is a generic term for data related to aspecific scenario of an application. The scenario data package containsscenario associated information of an internal running scenario of therunning target application. The scenario associated information, as thename suggests, refers to information of a scenario and may includescenario identifier, performance parameters, and the like. The internalrunning scenario can be classified according to different presetconditions. For example, the internal running scenario can be classifiedinto an interactive scenario and a non-interactive scenario according towhether there is user interaction. Alternatively, the internal runningscenario can be classified into a single-user scenario and a multi-userscenario according to the complexity of the task. Alternatively, theinternal running scenario can be classified into a scenario of switchingon the terminal device, a resource updating scenario, an account loggingscenario, a mall scenario, and a main interface scenario according todifferent behaviors of a user using the terminal device. The presetconditions can also be associated with different application types. Thatis, applications of different types can provide the same runningscenario or different running scenarios according to the presetcondition. The disclosure is not limited thereto.

The scenario associated information can include at least one kind ofinformation associated with the current internal running scenario of thetarget application. The at least one kind of information includes ascenario identifier and key performance parameters. The scenarioidentifier may be determined through key information collected of thecurrent internal running scenario. The key information can includeinformation of switching on the terminal device, resource updatinginformation, account logging information, and interface typeinformation. The key performance parameters can include a frame rate,frame loss, and stuck of the current internal running scenario, whichare not limited herein. In addition, a format of the scenario datapackage may be, for example, a JavaScript object notation (JSON), aprotocol buffer (Protobuf), and a custom format, which is not limitedherein.

In one implementation, a preset data channel is established between thetarget application and the operating system. The management modulereceives the scenario data package from the target application that iscurrently running as follows. The management module receives thescenario data package from the target application that is currentlyrunning, through the preset data channel.

The preset data channel may be an effective data transmission linkestablished between the target application and the operating system whenthe target application is running. When the target application is nolonger running, the data transmission link will be cleared.

In one implementation, the target application includes a data connectionmodule. The operating system includes a data connection managementmodule. Based on such configuration, the above-mentioned method furtherincludes the following. The data connection module and the dataconnection management module establish the preset data channel.

In one possible implementation, the target application further includesa data collecting module, a data sorting module, a priority managementmodule, and a data receiving module. The data collecting module isconfigured to collect key information regarding a running targetapplication. The data sorting module is configured to sort the keyinformation collected, such as merging duplicate information anddeleting redundant information. The priority management module isconfigured to classify the key information collected according to theimportance of key information. The priority management module isconfigured to deal with key information with higher priority first andto filter key information with lower priority or make the keyinformation with lower priority less used in a generation process of adata package. The data receiving module is configured to receive andparse data from a system application of the operating system, and sendthe data parsed to an interior of the target application.

At block 302, the management module determines, from among the pluralityof strategy modules, a strategy module corresponding to the applicationtype identifier.

In one implementation, as mentioned above, each of the plurality ofstrategy modules may be adapted to the same type application. Forexample, a first strategy module can be adapted to a game App and asecond strategy module may be adapted to an Instant Messenger App.

In one implementation, the management module determines, from among theplurality of strategy modules, the strategy module corresponding to theapplication type identifier in the following manner. The managementmodule determines the strategy module corresponding to the applicationtype identifier of the scenario data package by querying a mappingrelation between preset strategy modules and application typeidentifiers via using the application type identifier as a queryidentifier.

At block 303, the strategy module determines a performance improvementstrategy for the target application according to the scenario datapackage, specifically, the scenario associated information of the targetapplication.

In one implementation, the performance improvement strategy refers to aresource allocation strategy configured to improve running performanceof the target application that is currently running. For example, theresource allocation strategy can be a CPU resource adjustment strategy,a graphic processing unit (GPU) resource adjustment strategy, a memorybandwidth resource adjustment strategy, a disk resource adjustmentstrategy, a network resource adjustment strategy, and so on. Thedisclosure is not limited herein.

At block 304, the operating system adjusts allocation of systemresources for the target application according to the performanceimprovement strategy. Resource allocation can be performed a componentother than the management module and the strategy modules of theoperating system.

In one implementation, the system resources include at least one kind ofresources of the terminal device: CPU resources, GPU resources, memorybandwidth resources, disk resources, and network resources. The networkresources include network resources of a data network of the terminaldevice, network resources of a wireless fidelity (Wi-Fi) network, andcontrol parameter resources of a Bluetooth module. Resource allocation,for example, may refer to resource occupation rate of resources.

When the system resources are at least one of the CPU resources, the GPUresources, the memory bandwidth resources, and the disk resources, theoperating system communicate with a kernel layer of the operating systemspace via direct communication, so as to adjust the allocation of thesystem resources. The direct communication refers to communicatingdirectly through an abstract Application programming Interface (API).

For example, the system resources are network resources. In thissituation, the operating system can adjust allocation of the systemresources via indirect communication with the kernel layer of theoperating system space. The indirect communication is conducted byinvoking proxy services. For example, a Wi-Fi subsystem or a datanetwork subsystem in the network resources does not run in the samesystem as the operating system, in this situation, the system resourcescan be accessed indirectly through some proxy manners. Further, theoperating system provides a proxy service for the Wi-Fi subsystem toindirectly communicate with the Wi-Fi subsystem by invoking an interfaceof the proxy service.

Single-Strategy Module

Referring to FIG. 4, FIG. 4 is a schematic flow chat illustrating amethod for resource allocation according to an implementation of thedisclosure. The method described with reference to FIG. 4 below differsfrom that of FIG. 3 in that, the operating system for implementing themethod has a management module and one strategy module. Based on this,there is no need for the scenario data package to contain anyapplication type identifier for determining a specific strategy modulesince only one strategy module is available. Therefore, once themanagement module receives a scenario data package, the strategy modulecan determine a performance improvement strategy for the targetapplication according to the scenario data package, which will bedetailed below. As illustrated in FIG. 4, the method begins at block401.

At block 401, the management module receives a scenario data packagefrom a target application that is currently running, where the scenariodata package contains scenario associated information of the targetapplication.

At block 402, the strategy module determines a performance improvementstrategy for the target application according to the scenario datapackage, specifically, the scenario associated information of the targetapplication.

At block 403, the operating system adjusts allocation of systemresources for the target application according to the performanceimprovement strategy.

According to the implementations of the disclosure, the operating systemof the terminal device receives the scenario data package from thetarget application that is currently running, where the scenario datapackage contains the scenario associated information of the targetapplication. Then the operating system invokes the strategy module todetermine the performance improvement strategy for the targetapplication that is currently running according to the scenario datapackage. The operating system adjusts the allocation of the systemresources for the target application according to the performanceimprovement strategy. Since the scenario data package contains scenarioassociated information of the target application, and the scenario datapackage is sent by the target application that is currently running, thestrategy module of the operating system can precisely determine theperformance improvement strategy for the target application that iscurrently running according to the scenario data package, and theoperating system can adjust the allocation of the system resources forthe target application in real time according to the performanceimprovement strategy. Therefore, the real-time performance optimizationof the running target application can be realized by the operatingsystem, which is beneficial to improving the real-time performance andaccuracy of the performance optimization of the target application whichis conducted under control of the terminal device. With aid of thetechnical solutions of the present disclosure, there is no need for theterminal device to load all strategy modules at the same time, instead,the terminal device only needs to load the strategy module correspondingto the target application running in the foreground of the terminaldevice, which helps to reduce resource consumption and to improveresource utilization rate and control efficiency.

Besides, since the operating system includes the management module andthe strategy module(s), the management module and the strategy modulecooperate to confirm the performance improvement strategy of the targetapplication, that is, the process of determining the performanceimprovement strategy is completed in a modular approach, in which eachmodule implements a corresponding function, and when a single modulefails, it will not affect the state of another module, which isbeneficial to improve the stability of controlling the targetapplication for running optimization by the terminal device.

In one implementation, as mentioned above, the scenario data packagecontains scenario associated information of the target application.Based on this, the strategy module determines the performanceimprovement strategy for the target application according to thescenario data package as follows. The strategy module acquires thescenario associated information of the scenario data package anddetermines the performance improvement strategy for the targetapplication according to the scenario associated information. As can beseen, since the scenario associated information is associated with thetarget application that is currently running, it will be beneficial toaccurately determining the performance improvement strategy for thetarget application in the current running scenario and to improve theaccuracy of the resource allocation.

The scenario associated information includes at least one of thescenario identifier of the target application and the key performanceparameters of the target application.

Implementation 1

In one implementation, the scenario associated information includes thescenario identifier of the target application. In this case, thestrategy module determines the performance improvement strategy for thetarget application according to the scenario associated information asfollows. The strategy module determines a performance improvementstrategy corresponding to the scenario identifier as the performanceimprovement strategy for the target application.

The operating system invokes the strategy module to query a mappingrelation between preset performance improvement strategies and scenarioidentifiers by using the scenario identifier as a query identifier, todetermine the performance improvement strategy corresponding to thescenario identifier.

Since scenario identifiers and performance improvement strategies are inone-to-one correspondence and the scenario identifier of the scenariodata package is associated with a current scenario of the targetapplication that is currently running, that is, the performanceimprovement strategy determined is associated with a current runningstate of the target application that is currently running, adjusting ofresource allocation according to the performance improvement strategycan accurately optimize the current running state of the targetapplication, which is helpful for improving the accuracy of the terminaldevice in controlling the target application that is currently running.

Implementation 2

In another implementation, the scenario associated information includesthe key performance parameters of the target application. In this case,the strategy module determines the performance improvement strategy forthe target application according to the scenario associated informationas follows. The strategy module determines the performance improvementstrategy for the target application according to the key performanceparameters.

The key performance parameters are configured to describe key dataindicators for the target application, where the key data may refer to aframe rate, frame loss, and lag for example.

The strategy module determines the performance improvement strategy forthe target application according to the key performance parameters asfollows. The strategy module determines resources associated with thekey performance parameters as system resources to-be-adjusted,determines an adjustment amount of the system resources to-be-adjustedaccording to the key performance parameters, and determines or generatesthe performance improvement strategy for the target applicationaccording to the adjustment amount. As such, the adjustment amount ofthe system resources to-be-adjusted can be accurately calculated, whichhelps to improve the accuracy of the performance improvement strategy.

For example, the key performance parameters of the scenario associatedinformation are X frames per second (X FPS) frame rate; in thissituation, the strategy module determines that the system resourcesto-be-adjusted associated with the frame rate are CPU resources and GPUresources and then determines, according to the frame rate of X FPS,that an adjustment amount of the CPU resources is A and an adjustmentamount of the GPU resources is B, thereafter, according to theadjustment amount A and the adjustment amount B, the strategy modulegenerates the performance improvement strategy for the targetapplication, where according to the performance improvement strategy,performance parameters of the CPU resources will be increased by A andperformance parameters of the GPU resources will be increased by B.

In another implementation, the strategy module determines theperformance improvement strategy for the target application according tothe key performance parameters as follows. The strategy moduledetermines parameter types and a parameter numerical range of the keyperformance parameters, determines a performance improvement strategypackage corresponding to the parameter types, and determines, from amongthe performance improvement strategy package, a performance improvementstrategy suitable for the parameter numerical range by using theparameter numerical range as a query identifier. The strategy module canmanage a plurality of performance improvement strategy packagescorresponding to multiple parameter types. Each performance improvementstrategy package contains performance improvement strategies suitablefor different parameter numerical ranges. With aid of such setting,there is no need to calculate the adjustment amount of the systemresources to-be-adjusted in real time and the adjustment amount may beacquired by querying, which helps to quickly determine the performanceimprovement strategy.

As can be seen, the target application can send to the operating systemthe key performance parameters that are impossible for the operatingsystem to collect, so that the operating system can specificallyoptimize the performance of the target application in the currentinternal running scenario. That is, a performance improvement strategycan be quickly determined with high-accuracy according to the keyperformance parameters, so that the allocation of the system resourcesfor the target application that is currently running can be adjusted inreal time, which is beneficial to improving the real-time performanceand accuracy of the performance optimization of the target applicationwhich is conducted under control of the terminal device.

Implementation 3

In another implementation, the scenario associated information includesthe scenario identifier and the key performance parameters of the targetapplication. In this case, the strategy module determines theperformance improvement strategy for the target application according tothe scenario associated information as follows. The strategy moduledetermines the system resources to-be-adjusted corresponding to thescenario identifier and determines the performance improvement strategyfor the target application according to the system resourcesto-be-adjusted and the key performance parameters.

The system resources corresponding to the scenario identifier are systemresources in the terminal device, which can affect the runningperformance of the target application in the current internal runningscenario. For example, an internal running scenario of a game App is a“game mall interface” scenario. The scenario identifier of the “gamemall interface” scenario is a mall interface. Since the CPU resourcesand the disk resources of the terminal device affect the operationperformance of the “game mall interface” scenario, the system resourcescorresponding to the mall interface are the CPU resources and the diskresources.

The strategy module determines the performance improvement strategy forthe target application according to the system resources to-be-adjustedand the key performance parameters as follows. The strategy moduledetermines the adjustment amount of the system resources to-be-adjusted,according to parameters associated with the system resourcesto-be-adjusted in the key performance parameters and determines orgenerates the performance improvement strategy for the targetapplication according to the adjustment amount.

As can be seen, by setting that the system resources to-be-adjustedcorrespond to the scenario identifier and setting the key performanceparameters to be used to determine the adjustment amount of the systemresources to-be-adjusted, the performance improvement strategy for thetarget application in the current internal running scenario can begenerated. As such, extra calculation loss caused by redundancyinformation in the key performance parameters that is not related to thesystem resources to-be-adjusted can be avoided, which is beneficial toimproving the accuracy and efficiency of the allocation of the systemresources for the target application that is currently running.

In one implementation, the scenario data package contains a data formatidentifier. In this case, the strategy module acquires the scenarioassociated information of the scenario data package as follows.

Manner 1

The management module determines the scenario associated information ofthe target application by parsing the scenario data package according toa data format indicated by the data format identifier and sends thescenario associated information to the strategy module. It can be seenthat, the management module processes the scenario data package in aunified manner and what the strategy module needs to do is receivingfrom management module the processing result, that is, the scenarioassociated information. With aid of such setting, functions of thestrategy module can be optimized and refined, which facilitatesmaintenance, addition, and other operations performed on the strategymodule, therefore improving system stability.

Manner 2

Alternatively, the management module sends the scenario data package tothe strategy module and the strategy module determines the scenarioassociated information of the target application by parsing the scenariodata package according to the data format indicated by the data formatidentifier. After sending the scenario data package to the strategymodule, the management module can enter a dormant state to save power.It can be seen that the management module just sends the scenario datapackage to the strategy module for processing. Therefore, the managementmodule can quickly enter a dormant state after sending the scenario datapackage to the strategy module, and there is no need for the managementmodule to be continuously enabled, which is beneficial to reducing theoverall power consumption of the operating system and improving theefficiency.

Manner 3

Alternatively, the management module determines a first data formatassociated with the strategy module, converts a second data format ofthe scenario data package into the first data format when the seconddata format is different from the first data format, and sends to thestrategy module the scenario data package converted. Then the strategymodule determines the scenario associated information of the targetapplication, by parsing the scenario data package converted according tothe first data format. Thus, the management module can convert thescenario data package that the strategy module cannot recognize into ascenario data package that the strategy module is able to recognize andsend the scenario data package converted to the strategy module forprocessing. As a result, the situation that the scenario associatedinformation cannot be accurately determined due to a difference informats can be avoided, which is beneficial to improving the successrate of resource allocation for the target application that is currentlyrunning.

FIG. 5 is a schematic flow chart illustrating a method for resourceallocation according to an implementation of the present application.The method is applicable to a terminal device with a target applicationand an operating system. The target application runs in a user space ofthe terminal device. The operating system runs in an operating systemspace of the terminal device. The operating system includes a managementmodule and a plurality of strategy modules. The method starts at block501.

At block 501, the management module receives a scenario data packagefrom the target application that is currently running, where thescenario data package contains scenario associated information of thetarget application. The scenario data package may further contain anapplication type identifier of the target application.

At block 502, the management module determines, from among the pluralityof strategy modules, a strategy module corresponding to the applicationtype identifier. In case of only one strategy module arranged in theoperating system, operations at block 402 will be skipped and the methodwill proceed to operations at block 403 directly after the scenario datapackage is received at block 401.

At block 503, the strategy module acquires scenario associatedinformation from the scenario data package.

At block 504, the strategy module determines a performance improvementstrategy for the target application according to the scenario associatedinformation.

At block 505, the operating system adjusts allocation of systemresources for the target application according to the performanceimprovement strategy.

According to the implementation of the disclosure, the management moduleof the terminal device receives the scenario data package from thetarget application that is currently running, where the scenario datapackage contains the scenario associated information of the targetapplication. Then the operating system invokes the management module todetermine, from among the plurality of strategy modules, the strategymodule corresponding to the application type identifier if the operatingsystem is provided with more than one strategy module. The operatingsystem invokes the strategy module to determine the performanceimprovement strategy for the target application that is currentlyrunning according to the scenario associated information of the scenariodata package acquired. The operating system adjusts the allocation ofthe system resources for the target application according to theperformance improvement strategy. Since the scenario data package issent by the target application that is currently running, the strategymodule of the operating system can accurately determine the performanceimprovement strategy for the target application that is currentlyrunning according to the scenario data package and the operating systemcan adjust the allocation of the system resources for the targetapplication in real time according to the performance improvementstrategy. Therefore, the performance optimization of the running targetapplication can be achieved by the operating system in real time, whichis helpful for improving the real-time performance and accuracy of theperformance optimization of the target application which is conductedunder control of the terminal device. With aid of the technicalsolutions of the present disclosure, there is no need for the terminaldevice to load all strategy modules at the same time, instead, theterminal device only needs to load the strategy module corresponding tothe target application running in the foreground of the terminal device,which helps to reduce resource consumption and to improve resourceutilization rate and control efficiency.

In addition, the scenario associated information is associated with thetarget application that is currently running, which is beneficial toaccurately determining the performance improvement strategy for thetarget application in the current running scenario and improving theaccuracy of the resource allocation.

FIG. 6 is a schematic flow chart illustrating a method for resourceallocation. The method is applicable to a terminal device with a targetapplication and an operating system. The target application runs in auser space of the terminal device. The operating system runs in anoperating system space of the terminal device. The operating system hasan operating system application. The operating system includes amanagement module and a plurality of strategy modules. The method beginsat block 601.

At block 601, a preset data channel is established by a data connectionmanagement module and a data connection module.

At block 602, the data connection management module receives a scenariodata package from the target application through the preset datachannel.

At block 603, the management module determines, from among the pluralityof strategy modules, a strategy module corresponding to an applicationtype identifier obtained by parsing the scenario data package forexample. In case that the operating system has only one strategy module,operations at block 603 will be skipped.

At block 604, the management module determines scenario associatedinformation of the target application by parsing the scenario datapackage according to a data format indicated by the data formatidentifier and sends the scenario associated information to the strategymodule.

The scenario associated information includes a scenario identifier ofthe target application.

At block 605, the strategy module determines a performance improvementstrategy corresponding to the scenario identifier as the performanceimprovement strategy for the target application.

At block 606, the operating system adjusts allocation of systemresources for the target application according to the performanceimprovement strategy.

According to the implementations of the disclosure, the scenario datapackage can be transmitted via a preset data channel is established by adata connection management module and a data connection module. With aidof the scenario data package, which contains the scenario data packageor contains the scenario data package and the application typeidentifier, performance improvement strategy for the target applicationcan be determined and subsequently, system resource allocation can beadjusted.

In the foregoing implementations, since scenario identifiers andperformance improvement strategies are in one-to-one correspondence andthe scenario identifier of the scenario data package is associated witha current scenario of the target application that is currently running,that is, the performance improvement strategy determined is associatedwith a current running state of the target application that is currentlyrunning, adjusting of resource allocation according to the performanceimprovement strategy can accurately optimize the current running stateof the target application, which is helpful for improving the accuracyof the performance optimization of the terminal device in controllingthe target application that is currently running.

In addition, the management module processes the scenario data packagein a unified manner, and what the strategy module needs to do isreceiving from the management module the processing result, that is, thescenario associated information. With aid of such setting, functions ofthe strategy module can be optimized and refined, which facilitatesmaintenance, addition, and other operations performed on the strategymodule, therefore improving system stability.

FIG. 7 is a schematic structural diagram illustrating a terminal device700 according to an implementation of the disclosure. The terminaldevice 700 has at least one application running thereon and an operatingsystem 701. The operating system includes a management module and atleast one strategy module. As illustrated in FIG. 7, the terminal deviceincludes a processor 702, a memory 706 for storing at least one program,and a communication interface 704. The at least one program is differentfrom the foregoing at least one application. The at least one program isstored in the memory and configured to be performed by the processor.The at least one program includes instructions being operable to performthe following operations.

The management module of the operating system is controlled (forexample, under control of the processor 702) to receive a scenario datapackage from a target application that is currently running, where thescenario data package contains scenario associated information of thetarget application. The scenario data package may further contain anapplication type identifier of the target application.

The strategy module of the operating system is controlled to determine aperformance improvement strategy for the target application according tothe scenario data package. If the operating system has more than onestrategy module, the management module is further controlled todetermine, from among the plurality of strategy modules, a strategymodule corresponding to the application type identifier.

The operating system is controlled to adjust allocation of systemresources for the target application according to the performanceimprovement strategy.

According to the implementation of the disclosure, the management moduleof the operating system of the terminal device receives the scenariodata package from the target application that is currently running,where the scenario data package contains the scenario associatedinformation of the target application. Thereafter the operating systeminvokes the strategy module to determine the performance improvementstrategy for the target application that is currently running accordingto the scenario data package. At last, the operating system adjusts theallocation of system resources for the target application according tothe performance improvement strategy. Since the scenario data package issent by the target application that is currently running, the managementmodule of the operating system can precisely determine the performanceimprovement strategy for the target application that is currentlyrunning according to the scenario data package, and the operating systemcan adjust the allocation of the system resources for the targetapplication in real time according to the performance improvementstrategy. Therefore, the real-time performance optimization of thetarget application under running can be realized by the operatingsystem, which is beneficial to improving the real-time performance andaccuracy of the performance optimization of the target application whichis conducted under control of the terminal device. Moreover, theplurality of strategy modules can implement precise control forapplications of different types. With aid of the technical solutions ofthe present disclosure, the terminal device has no need to load allstrategy modules at the same time and only needs to load the strategymodule corresponding to the target application running in the foregroundof the terminal device, which helps to reduce resource consumption andimprove resource utilization rate and control efficiency.

In one implementation, the scenario data package contains scenarioassociated information of the target application. In terms ofcontrolling the strategy module to determine the performance improvementstrategy for the target application according to the scenario datapackage, the instructions are operable to carry out the following:controlling the strategy module to acquire the scenario associatedinformation of the scenario data package; controlling the strategymodule to determine the performance improvement strategy for the targetapplication according to the scenario associated information.

In one implementation, the scenario associated information includes ascenario identifier of the target application. In terms of controllingthe strategy module to determine the performance improvement strategyfor the target application according to the scenario associatedinformation, the instructions are operable to carry out the following:controlling the strategy module to determine a performance improvementstrategy corresponding to the scenario identifier as the performanceimprovement strategy for the target application.

In one implementation, the scenario associated information includes keyperformance parameters of the target application. In terms ofcontrolling the strategy module to determine the performance improvementstrategy for the target application according to the scenario associatedinformation, the instructions are operable to carry out the following:controlling the strategy module to determine the performance improvementstrategy for the target application according to the key performanceparameters.

In one implementation, the scenario associated information includes thescenario identifier and the key performance parameters of the targetapplication. In terms of controlling the strategy module to determinethe performance improvement strategy for the target applicationaccording to the scenario associated information, the instructions areoperable to carry out the following: controlling the strategy module todetermine system resources to-be-adjusted corresponding to the scenarioidentifier; controlling the strategy module to determine the performanceimprovement strategy for the target application according to the systemresources to-be-adjusted and the key performance parameters.

In one implementation, the scenario data package contains a data formatidentifier. In terms of controlling the strategy module to acquire thescenario associated information of the scenario data package, theinstructions are operable to carry out the following: controlling themanagement module to determine the scenario associated information ofthe target application by parsing the scenario data package according toa data format indicated by the data format identifier and send thescenario associated information to the strategy module.

Alternatively, in terms of controlling the strategy module to acquirethe scenario associated information of the scenario data package, theinstructions are operable to carry out the following: controlling themanagement module to send the scenario data package to the strategymodule; controlling the strategy module to determine the scenarioassociated information of the target application by parsing the scenariodata package according to the data format indicated by the data formatidentifier.

Alternatively, in terms of controlling the strategy module to acquirethe scenario associated information of the scenario data package, theinstructions are operable to carry out the following: controlling themanagement module to determine a first data format associated with thestrategy module, to convert a second data format of the scenario datapackage into the first data format when the second data format isdifferent from the first data format, and to send to the strategy modulethe scenario data package converted; controlling the strategy module todetermine the scenario associated information of the target applicationby parsing the scenario data package converted according to the firstdata format.

In one implementation, the target application includes a data connectionmodule. The operating system includes a data connection managementmodule. In terms of controlling the operating system to receive thescenario data package from the target application that is currentlyrunning, the instructions are operable to perform the following:controlling the data connection management module and the dataconnection module to establish a preset data channel; controlling thedata connection management module to receive the scenario data packagefrom the target application through the preset data channel.

In one possible implementation, the system resources include at leastone of CPU resources, GPU resources, memory bandwidth resources, diskresources, and network resources.

The foregoing mainly describes the solutions of the implementations ofthe present application from the perspective of the implementationprocess of the method. It can be understood that, in order to achievethe above functions, the terminal device may include hardware structuresand/or software modules corresponding to the respective functions. Thoseskilled in the art should readily recognize that, in combination withthe exemplary units and scheme steps or operations described in theimplementations provided herein, the present disclosure can beimplemented in hardware or a combination of hardware and computersoftware. Whether a function is implemented by way of hardware orcomputer software driving hardware depends on the particular applicationand design constraints of the technical solution. Those skilled in theart may use different methods to implement the described functions foreach particular application, but such implementation should not beconsidered as beyond the scope of the present disclosure.

According to the implementations of the present disclosure, functionalunits may be divided for the terminal device according to the foregoingmethod examples. For example, functional units may be divided accordingto corresponding functions and two or more functions may be integratedinto one processing unit. The above-mentioned integrated unit can beimplemented in the form of hardware or software functional units. Itshould be noted that the division of units in the implementations of thepresent disclosure is schematic and is merely a logical functiondivision; there may be other division modes in actual implementations.

FIG. 8 is a block diagram illustrating functional units of a device forresource allocation according to an implementation of the disclosure,when integrated units are adopted. A device 800 for resource allocationis applicable to a terminal device with an operating system and at leastone application. The operating system includes a management module and aplurality of strategy modules. The device 800 includes a processing unit802 and a communication unit 803. The processing unit 802 is configuredto control and manage operations of the device for resource allocation.For example, the processing unit 802 is configured to support the devicefor resource allocation to perform operations at blocks 201-203illustrated in FIG. 2, operations at blocks 301-304 illustrated in FIG.3, operations at blocks 401-403 illustrated in FIG. 4, operations atblocks 501-505 illustrated in FIG. 5, operations at blocks 601-606illustrated in FIG. 6, and/or other processes for the techniquesdescribed herein. The device 800 may further include a storing unit 801for storing program codes and data.

The processing unit 802 is configured to: control the management moduleto receive a scenario data package from a target application that iscurrently running, through the communication unit 803, where thescenario data package contains scenario associated information of thetarget application; control the strategy module to determine aperformance improvement strategy for the target application according tothe scenario associated information of the scenario data package; adjustallocation of system resources for the target application according tothe performance improvement strategy.

If the operating system has than one strategy module, the processingunit 802 is further configured to determine, from among the plurality ofstrategy modules, a strategy module corresponding to an application typeidentifier contained in the scenario data package.

In one implementation, the processing unit 802 configured to control thestrategy module to determine the performance improvement strategy forthe target application according to the scenario data package isconfigured to: control the strategy module to acquire the scenarioassociated information of the scenario data package; control thestrategy module to determine the performance improvement strategy forthe target application according to the scenario associated information.

In one implementation, the scenario associated information includes ascenario identifier of the target application. The processing unit 802configured to control the strategy module to determine the performanceimprovement strategy for the target application according to thescenario associated information is configured to: control the strategymodule to determine a performance improvement strategy corresponding tothe scenario identifier as the performance improvement strategy for thetarget application.

In one implementation, the scenario associated information includes keyperformance parameters of the target application. The processing unit802 configured to control the strategy module to determine theperformance improvement strategy for the target application according tothe scenario associated information is configured to: control thestrategy module to determine the performance improvement strategy forthe target application according to the key performance parameters.

In one implementation, the scenario associated information includes thescenario identifier and the key performance parameters of the targetapplication. The processing unit 802 configured to control the strategymodule to determine the performance improvement strategy for the targetapplication according to the scenario associated information isconfigured to control the strategy module to: determine system resourcesto-be-adjusted corresponding to the scenario identifier; determine theperformance improvement strategy for the target application according tothe system resources to-be-adjusted and the key performance parameters.

In one implementation, the scenario data package contains a data formatidentifier. The processing unit 802 configured to control the strategymodule to acquire the scenario associated information of the scenariodata package is configured to control the management module to:determine the scenario associated information of the target applicationby parsing the scenario data package according to a data formatindicated by the data format identifier; send the scenario associatedinformation to the strategy module.

Alternatively, the processing unit 802 configured to control thestrategy module to acquire the scenario associated information of thescenario data package is configured to: control the management module tosend the scenario data package to the strategy module; control thestrategy module to determine the scenario associated information of thetarget application by parsing the scenario data package according to thedata format indicated by the data format identifier.

Alternatively, the processing unit 802 configured to control thestrategy module to acquire the scenario associated information of thescenario data package is configured to: control the management module todetermine a first data format associated with the strategy module, toconvert a second data format of the scenario data package into the firstdata format when the second data format is different from the first dataformat, and to send to the strategy module the scenario data packageconverted; control the strategy module to determine the scenarioassociated information of the target application by parsing the scenariodata package converted according to the first data format.

In one implementation, a preset data channel is established between thetarget application and the operating system. The processing unit 802configured to receive the scenario data package from the targetapplication that is currently running through the communication unit 803is configured to: receive the scenario data package from the targetapplication that is currently running, through the communication unit803 and via the preset data channel.

In one implementation, the target application includes a data connectionmodule. The operating system includes a data connection managementmodule. The device further includes a channel establishment unit. Thechannel establishment unit is configured to control the data connectionmanagement module and the data connection module to establish the presetdata channel.

In one implementation, the system resources include at least one kind ofresources of the terminal device: CPU resources, GPU resources, memorybandwidth resources, disk resources, and network resources. The networkresources include network resources of the data network of the terminaldevice, network resources of the wireless fidelity (Wi-Fi) network, andcontrol parameter resources of the Bluetooth module.

The processing unit 802 may be a processor or a controller. Thecommunication unit 703 may be an internal communication interfacebetween the processor and the program space, such as a communicationinterface between the processor and the operating system or acommunication interface between the processor and the user space. Thestoring unit 801 may be a memory.

Referring to FIG. 9, FIG. 9 is a schematic structural diagramillustrating a smart phone 900 according to an implementation of thedisclosure. The smart phone 900 includes a housing 910, a touch displayscreen 920, a main board 930, a battery 940, and a sub-board 950. Themain board 930 is provided with a front camera 931, a processor 932, amemory 933, and a power management chip 934. The sub-board 950 isprovided with a vibrator 951, an integrated audio cavity 952, a VOOCflash charging interface 953, and a fingerprint recognition module 954.

The smart phone has an operating system and at least one application.The target application runs in a user space, and the operating systemruns in an operating system space. The operating system is configured toreceive a scenario data package from the target application that iscurrently running. The operating system is configured to determine aperformance improvement strategy for the target application according tothe scenario data package. The operating system is further configured toadjust allocation of system resources for the target application that iscurrently running according to the performance improvement strategy.

The processor 932 is a control center of the mobile phone. The processor932 is configured to connect various parts of the entire smart phonethrough various interfaces and lines, run or execute software programsand/or modules stored in the memory 933, and invoke data stored in thememory 933, to execute various functions of the smart phone and processdata, thereby monitoring the smart phone as a whole. In at least oneimplementation, the processor 932 may include at least one processingunit. For example, the processor 932 can be integrated with anapplication processor and a modem processor, where the applicationprocessor is mainly configured to handle and maintain an operatingsystem, a user interface, applications, and so on. The modem processoris mainly configured to process wireless communication. It will beappreciated that the above-mentioned modem processor mentioned above maynot be integrated into the processor 932. The processor 932 may be, forexample, a central processing unit (CPU), a general-purpose processor, adigital signal processor (DSP), an application-specific integratedcircuit (ASIC), a field programmable gate array (FPGA), or otherprogrammable logic devices, transistor logic devices, hardwarecomponents, or any combination thereof. Various exemplary logicalblocks, modules, and circuits described in conjunction with thedisclosure may be achieved or implemented. The processor may also be acombination of computing functions, for example, a combination of one ormore microprocessors, a combination of the DSP and a microprocessor, andthe like.

The memory 933 is configured to store software programs and modules. Theprocessor 932 is configured to execute various function applications anddata processing of the smart phone by running the software programs andthe modules stored in the memory 933. The memory 933 may mainly includea program storage area and a data storage area. The program storage areamay store an operating system, applications required for at least onefunction, and the like. The data storage area may store data createdaccording to the use of the smart phone, and the like. In addition, thememory 933 may include a high-speed random access memory (RAM), and mayfurther include a non-transitory memory such as at least one diskstorage device, a flash device, or other non-transitory solid storagedevices. The memory 933 may be, for example, a RAM, a flash memory, aread only memory (ROM), an erasable programmable ROM (EPROM), or anelectrically EPROM (EEPROM), a register, a hard disk, a mobile harddisk, a compact disc-read only memory (CD-ROMs), or any other form ofstorage medium known in the art.

Implementations of the present disclosure also provide a non-transitorycomputer storage medium. The computer storage medium stores computerprograms which, when executed, are operable with a computer to performall or part of the operations of any of the methods described in theabove-described method implementations. The computer may include aterminal device.

In one implementation, the computer programs cause the computer toperform the following operations. An operating system receives ascenario data package from a target application that is currentlyrunning. The operating system determines a performance improvementstrategy for the target application according to the scenario associatedinformation. The operating system adjusts allocation of system resourcesfor the target application according to the performance improvementstrategy.

The scenario data package contains scenario associated information ofthe target application, the scenario associated information includes atleast one of a scenario identifier and key performance parameters. Theoperating system includes one management module and at least onestrategy module, one of which is configured or determined to determinethe performance improvement strategy.

The scenario data package may further include application typeidentifier, with which one strategy module can be determined frommultiple strategy modules to determine a specific performanceimprovement strategy.

Implementations of the present disclosure also provide a computerprogram product. The computer program product includes a non-transitorycomputer-readable storage medium storing computer programs. The computerprograms are operable with a computer to perform all or part of theoperations of any of the methods described in the above methodimplementations. The computer program product may be a softwareinstallation package. The computer may include a terminal device.

It is to be noted that, for the sake of simplicity, the foregoing methodimplementations are described as a series of action combinations.However, it will be appreciated by those skilled in the art that thepresent disclosure is not limited by the sequence of actions described.According to the present disclosure, certain steps or operations may beperformed in other order or simultaneously. Besides, it will beappreciated by those skilled in the art that the implementationsdescribed in the specification are exemplary implementations and theactions and modules involved are not necessarily essential to thepresent disclosure.

In the foregoing implementations, the description of each implementationhas its own emphasis. For the parts not described in detail in oneimplementation, reference may be made to related descriptions in otherimplementations.

In the implementations of the disclosure, it should be understood that,the device disclosed in implementations provided herein may beimplemented in other manners. For example, the device/apparatusimplementations described above are merely illustrative; for instance,the division of the unit is only a logical function division and therecan be other manners of division during actual implementations, forexample, multiple units or components may be combined or may beintegrated into another system, or some features may be ignored,omitted, or not performed. In addition, coupling or communicationconnection between each illustrated or discussed component may be directcoupling or communication connection, or may be indirect coupling orcommunication among devices or units via some interfaces, and may beelectrical connection, mechanical connection, or other forms ofconnection.

The units described as separate components may or may not be physicallyseparated, the components illustrated as units may or may not bephysical units, that is, they may be in the same place or may bedistributed to multiple network elements. All or part of the units maybe selected according to actual needs to achieve the purpose of thetechnical solutions of the implementations.

In addition, the functional units in various implementations of thepresent disclosure may be integrated into one processing unit, or eachunit may be physically present, or two or more units may be integratedinto one unit. The above-mentioned integrated unit can be implemented inthe form of hardware or a software function unit.

The integrated unit may be stored in a computer-readable memory when itis implemented in the form of a software functional unit and is sold orused as a separate product. Based on such understanding, the technicalsolutions of the present disclosure essentially, or the part of thetechnical solutions that contributes to the related art, or all or partof the technical solutions, may be embodied in the form of a softwareproduct which is stored in a memory and includes instructions forcausing a computer device (which may be a personal computer, a server,or a network device and so on) to perform all or part of the stepsdescribed in the various implementations of the present disclosure. Thememory includes various medium capable of storing program codes, such asa USB (universal serial bus) flash disk, a read-only memory (ROM), arandom access memory (RAM), a mobile hard disk, Disk, compact disc (CD),or the like.

It will be understood by those of ordinary skill in the art that all ora part of the various methods of the implementations described above maybe accomplished by means of a program to instruct associated hardware,the program may be stored in a computer-readable memory, which mayinclude a flash memory, a ROM, a RAM, a disk or a compact disc (CD), andso on.

While the disclosure has been described in connection with certainimplementations, it is to be understood that the disclosure is not to belimited to the disclosed implementations but, on the contrary, isintended to cover various modifications and equivalent arrangementsincluded within the scope of the appended claims, which scope is to beaccorded the broadest interpretation so as to encompass all suchmodifications and equivalent structures as is permitted under the law.

What is claimed is:
 1. A method for resource allocation, comprising:receiving, by a management module of an operating system, a scenariodata package from a target application that is currently running, thescenario data package comprising scenario associated information of thetarget application; determining, by a strategy module of the operatingsystem, a performance improvement strategy for the target applicationaccording to the scenario data package; and adjusting, by the operatingsystem, allocation of system resources for the target applicationaccording to the performance improvement strategy.
 2. The method ofclaim 1, wherein the operating system comprises more than one strategymodule, and each strategy module is configured to determine aperformance improvement strategy for at least one application of thesame application type.
 3. The method of claim 2, wherein the scenariodata package further comprises an application type identifier of thetarget application, and the method further comprises: prior todetermining the performance improvement strategy for the targetapplication according to the scenario data package: acquiring, by themanagement module, the application type identifier from the scenariodata package; and determining, by the management module from the morethan one strategy module, a strategy module corresponding to theapplication type identifier as the strategy module for determining theperformance improvement strategy.
 4. The method of claim 1, wherein theoperating system comprises one strategy module.
 5. The method of claim1, wherein determining the performance improvement strategy for thetarget application according to the scenario data package comprises:acquiring, by the strategy module, the scenario associated informationfrom the scenario data package; and determining, by the strategy module,the performance improvement strategy for the target applicationaccording to the scenario associated information.
 6. The method of claim5, wherein the scenario associated information comprises a scenarioidentifier of the target application, and determining the performanceimprovement strategy for the target application according to thescenario associated information comprises: determining, by the strategymodule, a performance improvement strategy corresponding to the scenarioidentifier as the performance improvement strategy for the targetapplication.
 7. The method of claim 5, wherein the scenario associatedinformation comprises key performance parameters of the targetapplication, and determining the performance improvement strategy forthe target application according to the scenario associated informationcomprises: determining, by the strategy module, the performanceimprovement strategy for the target application according to the keyperformance parameters.
 8. The method of claim 5, wherein the scenarioassociated information comprises a scenario identifier and keyperformance parameters of the target application, and determining theperformance improvement strategy for the target application according tothe scenario associated information comprises: determining, by thestrategy module, to-be-adjusted system resources corresponding to thescenario identifier; and determining, by the strategy module, theperformance improvement strategy for the target application according tothe to-be-adjusted system resources and the key performance parameters.9. The method of claim 5, wherein the scenario data package comprises adata format identifier, and acquiring the scenario associatedinformation from the scenario data package comprises: determining, bythe management module, the scenario associated information of the targetapplication by parsing the scenario data package according to a dataformat indicated by the data format identifier; and sending, by themanagement module, the scenario associated information to the strategymodule.
 10. The method of claim 5, wherein the scenario data packagecomprises a data format identifier, and acquiring the scenarioassociated information from the scenario data package comprises:sending, by the management module, the scenario data package to thestrategy module; and determining, by the strategy module, the scenarioassociated information of the target application by parsing the scenariodata package according to a data format indicated by the data formatidentifier.
 11. The method of claim 5, wherein the scenario data packagecomprises a data format identifier, and acquiring the scenarioassociated information from the scenario data package comprises:determining, by the management module, a first data format associatedwith the strategy module; converting, by the strategy module, a seconddata format of the scenario data package into the first data format whenthe second data format is different from the first data format; sending,by the management module, the scenario data package subjected toconverting, to the strategy module; and determining, by the strategymodule, the scenario associated information of the target application byparsing the scenario data package subjected to the converting, accordingto the first data format.
 12. The method of claim 1, wherein receivingthe scenario data package from the target application that is currentlyrunning comprises: receiving, by the management module, the scenariodata package from the target application that is currently runningthrough a preset data channel established between the target applicationand the operating system.
 13. A terminal device, comprising: at leastone processor; and a non-transitory computer readable storage medium,coupled to the at least one processor and storing at least one computerexecutable instruction thereon which, when executed by the at least oneprocessor, causes the at least one processor to: receive, by amanagement module of an operating system, a scenario data package from atarget application that is currently running, the scenario data packagecomprising scenario associated information of the target application;determine, by a strategy module of the operating system, a performanceimprovement strategy for the target application according to thescenario data package; and adjust, by the operating system, allocationof system resources for the target application according to theperformance improvement strategy.
 14. The terminal device of claim 13,wherein the at least one computer executable instruction causing the atleast one processor to determine the performance improvement strategyfor the target application according to the scenario data packagefurther causes the at least one processor to: acquire, by the strategymodule, scenario associated information from the scenario data package;and determine, by the strategy module, the performance improvementstrategy for the target application according to the scenario associatedinformation.
 15. The terminal device of claim 14, wherein the scenarioassociated information comprises a scenario identifier of the targetapplication, and the at least one computer executable instructioncausing the at least one processor to determine the performanceimprovement strategy for the target application according to thescenario associated information further causes the at least oneprocessor to: determine, by the strategy module, a performanceimprovement strategy corresponding to the scenario identifier as theperformance improvement strategy for the target application.
 16. Theterminal device of claim 14, wherein the scenario associated informationcomprises key performance parameters of the target application, and theat least one computer executable instruction causing the at least oneprocessor to determine the performance improvement strategy for thetarget application according to the scenario associated informationfurther causes the at least one processor to: determine, by the strategymodule, the performance improvement strategy for the target applicationaccording to the key performance parameters.
 17. The terminal device ofclaim 14, wherein the scenario associated information comprises ascenario identifier and key performance parameters of the targetapplication, and the at least one computer executable instructioncausing the at least one processor to determine the performanceimprovement strategy for the target application according to thescenario associated information further causes the at least oneprocessor to: determine, by the strategy module, to-be-adjusted systemresources corresponding to the scenario identifier; and determine, bythe strategy module, the performance improvement strategy for the targetapplication according to the to-be-adjusted system resources and the keyperformance parameters.
 18. The terminal device of claim 13, wherein theoperating system comprises more than one strategy module and eachstrategy module is configured to determine a performance improvementstrategy for at least one application of the same application type, thescenario data package further comprises an application type identifierof the target application, and the at least one computer executableinstruction causing the at least one processor to determine theperformance improvement strategy for the target application according tothe scenario data package further causes the at least one processor to:acquire, by the management module, the application type identifier fromthe scenario data package; and determine, by the management module, fromthe more than one strategy module, a strategy module corresponding tothe application type identifier as the strategy module for determiningthe performance improvement strategy.
 19. A non-transitory computerreadable storage medium, storing at least one computer executableinstruction thereon, which, when executed by a data-processingapparatus, is adapted to: receive, by an operating system, a scenariodata package from a target application that is currently running;determine, by the operating system, a performance improvement strategyfor the target application according to scenario associated information;and adjust, by the operating system, allocation of system resources forthe target application according to the performance improvementstrategy.
 20. The non-transitory computer readable storage medium ofclaim 19, wherein the operating system comprises a management module forthe receiving and at least one strategy module.